<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <title>mysql性能分析 | Hexo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="explain　　EXPLAIN SELECT * FROM TABLE_NAME;



id
select_type
table
type
possible_keys
key
key_len
ref
rows
Extra




1
SIMPLE
table_name
ALL
NULL
NULL
NULL
NULL
100



　　1. table #显示该语句涉及的表　　2. type #">
<meta property="og:type" content="article">
<meta property="og:title" content="mysql性能分析">
<meta property="og:url" content="http://yoursite.com/2016/01/24/database/8.mysql性能分析/index.html">
<meta property="og:site_name" content="Hexo">
<meta property="og:description" content="explain　　EXPLAIN SELECT * FROM TABLE_NAME;



id
select_type
table
type
possible_keys
key
key_len
ref
rows
Extra




1
SIMPLE
table_name
ALL
NULL
NULL
NULL
NULL
100



　　1. table #显示该语句涉及的表　　2. type #">
<meta property="og:image" content="http://yoursite.com/images/mysql-slow-query.png">
<meta property="og:image" content="http://yoursite.com/images/mysql-profile.png">
<meta property="og:image" content="http://yoursite.com/images/mysql-profile-queryid.png">
<meta property="og:image" content="http://yoursite.com/images/mysql-connections.png">
<meta property="og:updated_time" content="2016-01-29T17:47:36.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="mysql性能分析">
<meta name="twitter:description" content="explain　　EXPLAIN SELECT * FROM TABLE_NAME;



id
select_type
table
type
possible_keys
key
key_len
ref
rows
Extra




1
SIMPLE
table_name
ALL
NULL
NULL
NULL
NULL
100



　　1. table #显示该语句涉及的表　　2. type #">
  
    <link rel="alternative" href="/atom.xml" title="Hexo" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  <link rel="stylesheet" href="/css/style.css" type="text/css">
  

</head>
<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">Hexo</a>
      </h1>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="Search"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" results="0" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-database/8.mysql性能分析" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2016/01/24/database/8.mysql性能分析/" class="article-date">
  <time datetime="2016-01-24T03:27:00.000Z" itemprop="datePublished">2016-01-24</time>
</a>
    
  <div class="article-category">
    <a class="article-category-link" href="/categories/database/">database</a>
  </div>

  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      mysql性能分析
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h2 id="explain"><a href="#explain" class="headerlink" title="explain"></a>explain</h2><p>　　EXPLAIN SELECT * FROM <code>TABLE_NAME</code>;</p>
<table>
<thead>
<tr>
<th style="text-align:center">id</th>
<th style="text-align:center">select_type</th>
<th style="text-align:center">table</th>
<th style="text-align:center">type</th>
<th style="text-align:center">possible_keys</th>
<th style="text-align:center">key</th>
<th style="text-align:center">key_len</th>
<th style="text-align:center">ref</th>
<th style="text-align:center">rows</th>
<th style="text-align:center">Extra</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center">1</td>
<td style="text-align:center">SIMPLE</td>
<td style="text-align:center">table_name</td>
<td style="text-align:center">ALL</td>
<td style="text-align:center">NULL</td>
<td style="text-align:center">NULL</td>
<td style="text-align:center">NULL</td>
<td style="text-align:center">NULL</td>
<td style="text-align:center">100</td>
</tr>
</tbody>
</table>
<p>　　1. table #显示该语句涉及的表<br>　　2. <strong>type</strong> #这列很重要，显示了连接使用了哪种类别,有无使用索引，反映语句的质量。<br>　　3. possible_keys #列指出MySQL能使用哪个索引在该表中找到行<br>　　4. key #显示MySQL实际使用的键（索引）。如果没有选择索引，键是NULL。<br>　　5. key_len #显示MySQL决定使用的键长度。如果键是NULL，则长度为NULL。使用的索引的长度。在不损失精确性的情况下，长度越短越好<br>　　6. ref #显示使用哪个列或常数与key一起从表中选择行。<br>　　7. rows #显示MySQL认为它执行查询时必须检查的行数。<br>　　8. extra #包含MySQL解决查询的详细信息。<br>　　<strong>type</strong>显示的是访问类型，结果值从好到坏依次是：<br>system &gt; const &gt; eq_ref &gt; ref &gt; fulltext &gt; ref_or_null &gt; index_merge &gt; unique_subquery &gt; index_subquery &gt; range &gt; index &gt; ALL（优–&gt;差）。一般来说，得保证查询至少达到range级别，最好能达到ref，否则就可能会出现性能问题。</p>
<h2 id="u6162_u67E5_u8BE2_u65E5_u5FD7"><a href="#u6162_u67E5_u8BE2_u65E5_u5FD7" class="headerlink" title="慢查询日志"></a>慢查询日志</h2><p>　　按照《mysql编译安装》安装mysql-5.6.24后，看看慢日志查询的配置情况，如下所示：<img src="/images/mysql-slow-query.png" alt="慢查询日志"><br>　　完整配置如下：<br><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="comment">-- 开启慢查询日志，运行中mysql立即生效，重启后失效</span></span><br><span class="line"><span class="operator"><span class="keyword">set</span> <span class="keyword">global</span> slow_query_log = <span class="keyword">on</span>;</span></span><br><span class="line"><span class="operator"><span class="keyword">set</span> <span class="keyword">global</span> long_query_time=<span class="number">1</span>;</span></span><br><span class="line">#要通过<span class="operator"><span class="keyword">show</span>立刻看到效果，需要先关闭客户端，重新连接</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 重启后仍然生效配置：</span></span><br><span class="line">修改/usr/<span class="keyword">local</span>/mysql/my.cnf，[mysqld]下增加如下内容</span><br><span class="line">long_query_time=<span class="number">1</span></span><br><span class="line">slow_query_log=<span class="number">1</span></span><br><span class="line"><span class="comment">-- 慢查询日志文件位置</span></span><br><span class="line">slow_query_log_file</span><br><span class="line"></span><br><span class="line"><span class="comment">-- 关闭myslq服务后再启动</span></span><br><span class="line">service mysqld <span class="keyword">stop</span>;</span></span><br><span class="line">service mysqld <span class="operator"><span class="keyword">start</span>;</span></span><br></pre></td></tr></table></figure></p>
<p>　　MySQL自带了mysqldumpslow工具用来分析slow query日志，或者其它工具也可以，通过工具配合可以更好的分析。</p>
<h2 id="Profiling"><a href="#Profiling" class="headerlink" title="Profiling"></a>Profiling</h2><p>　　<strong>慢查询日志负责找出需要优化的语句（即耗时语句），再采用Profiling对语句进行优化。</strong><br>　　MySQL的Query Profiler是一个使用非常方便的 Query 诊断分析工具，通过该工具可以获取一条Query 在整个执行过程中多种资源的消耗情况，如CPU，IO，IPC，SWAP等，以及发生的PAGE FAULTS，CONTEXT SWITCHE等等，同时还能得到该Query执行过程中MySQL所调用的各个函数在源文件中的位置。下面我们看看 Query Profiler 的具体用法。<br>　　1、开启profiling参数：set profiling=1;<br>　　2、执行Query：select message_id,count(*) from t_message_push_info group by message_id;在开启 Query Profiler 功能之后，MySQL 就会自动记录所有执行的 Query 的 profile 信息了。<br>　　3、获取系统中保存的所有 Query 的 profile 信息：执行 “SHOW PROFILE” 命令即可。如下图所示：<img src="/images/mysql-profile.png" alt="mysql-profile"><br>　　4、针对单个 Query 获取详细的 profile 信息。在获取到概要信息之后，可以根据概要信息中的 Query_ID 来获取某个 Query 在执行过程中详细的 profile 信息了，具体操作如下：show profile cpu, block io for query 11;如下图所示：<img src="/images/mysql-profile-queryid.png" alt="sql执行详情"><br>　　上面的例子中是获取 CPU 和 Block IO 的消耗，非常清晰，对于定位性能瓶颈非常适用。希望得到取其他的信息，都可以通过执行 “SHOW PROFILE <em>*</em> FOR QUERY n” 来获取，各位读者朋友可以自行测试熟悉。</p>
<h2 id="u6700_u5927_u8FDE_u63A5_u6570"><a href="#u6700_u5927_u8FDE_u63A5_u6570" class="headerlink" title="最大连接数"></a>最大连接数</h2><p>　　set global max_connections = 500;　#max_user_connections为某个用户的最大连接数<br>　　修改my.ini或my.cnf，查找max_connections，修改为max_connections=1000<br>　　查看当前的连接情况：show full processlist;，如下图所示：<img src="/images/mysql-connections.png" alt="mysql-connections"></p>
<h2 id="u5206_u533A"><a href="#u5206_u533A" class="headerlink" title="分区"></a>分区</h2><p>　　删除表分区会造成该表分区内部数据也一起被删除掉<br>　　Rang分区、List分区、Hash分区（确保数据在预先确定数目的分区中平均分布）和Key分区，一个数据表最多只能有1024个分区</p>
<h4 id="List_u5206_u533A"><a href="#List_u5206_u533A" class="headerlink" title="List分区"></a>List分区</h4><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line">CREATE TABLE employees (</span><br><span class="line">    id INT NOT NULL,</span><br><span class="line">    fname VARCHAR(30),</span><br><span class="line">    lname VARCHAR(30),</span><br><span class="line">    hired DATE NOT NULL DEFAULT '1970-01-01',</span><br><span class="line">    separated DATE NOT NULL DEFAULT '9999-12-31',</span><br><span class="line">    job_code INT,</span><br><span class="line">    store_id INT</span><br><span class="line">)PARTITION BY LIST(store_id)(</span><br><span class="line">    PARTITION pNorth VALUES IN (3,5,6,9,17),</span><br><span class="line">    PARTITION pEast VALUES IN (1,2,10,11,19,20),</span><br><span class="line">    PARTITION pWest VALUES IN (4,12,13,14,18),</span><br><span class="line">    PARTITION pCentral VALUES IN (7,8,15,16)</span><br><span class="line">);</span><br><span class="line"></span><br><span class="line">DELIMITER $$</span><br><span class="line">DROP PROCEDURE IF EXISTS SampleProc$$</span><br><span class="line">CREATE PROCEDURE SampleProc()</span><br><span class="line">    BEGIN</span><br><span class="line">        DECLARE x INT;</span><br><span class="line">        SET x = 1;</span><br><span class="line">        WHILE x&lt;= 20 DO</span><br><span class="line">            insert into employees(id,fname,lname,hired,separated,job_code,store_id) values(x,concat('firstname',x),concat('ai',x),'1994-01-01','1999-01-01',10,x);</span><br><span class="line">            SET  x = x + 1;</span><br><span class="line">        END WHILE;</span><br><span class="line">    END$$</span><br><span class="line">/*执行存储过程*/</span><br><span class="line">call SampleProc() $$</span><br><span class="line">delimiter ;</span><br></pre></td></tr></table></figure>
<p>　　查看是否用到了分区：<br><figure class="highlight sql"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="operator"><span class="keyword">explain</span> <span class="keyword">SELECT</span> <span class="keyword">count</span>(*) <span class="keyword">FROM</span> employees <span class="keyword">WHERE</span> store_id = <span class="number">1</span> <span class="keyword">GROUP</span> <span class="keyword">BY</span> store_id;</span></span><br><span class="line"><span class="comment">-- store_id所在的分区有6条数据（表中所有数据为20条），本次查询只扫描了6条数据，使用到了分区</span></span><br></pre></td></tr></table></figure></p>
<h4 id="Hash_u5206_u533A"><a href="#Hash_u5206_u533A" class="headerlink" title="Hash分区"></a>Hash分区</h4><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line">CREATE TABLE employees (</span><br><span class="line">    id INT NOT NULL,</span><br><span class="line">    fname VARCHAR(30),</span><br><span class="line">    lname VARCHAR(30),</span><br><span class="line">    hired DATE NOT NULL DEFAULT '1970-01-01',</span><br><span class="line">    separated DATE NOT NULL DEFAULT '9999-12-31',</span><br><span class="line">    job_code INT,</span><br><span class="line">    store_id INT</span><br><span class="line">)PARTITION BY HASH(store_id)</span><br><span class="line">    PARTITIONS 4;</span><br><span class="line"> </span><br><span class="line">DELIMITER $$</span><br><span class="line">DROP PROCEDURE IF EXISTS SampleProc$$</span><br><span class="line">CREATE PROCEDURE SampleProc()</span><br><span class="line">    BEGIN</span><br><span class="line">        DECLARE x INT;</span><br><span class="line">        SET x = 1;</span><br><span class="line">        WHILE x&lt;= 20 DO</span><br><span class="line">            insert into employees(id,fname,lname,hired,separated,job_code,store_id) values(x,concat('firstname',x),concat('ai',x),'1994-01-01','1999-01-01',10,x);</span><br><span class="line">            SET  x = x + 1;</span><br><span class="line">        END WHILE;</span><br><span class="line">    END$$</span><br><span class="line">/*执行存储过程*/</span><br><span class="line">call SampleProc() $$</span><br><span class="line">delimiter ;</span><br><span class="line"></span><br><span class="line">-- 正常使用了分区 </span><br><span class="line">explain SELECT count(*) FROM employees WHERE store_id = 1 GROUP BY store_id;</span><br></pre></td></tr></table></figure>
<h4 id="Key_u5206_u533A"><a href="#Key_u5206_u533A" class="headerlink" title="Key分区"></a>Key分区</h4><figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br></pre></td><td class="code"><pre><span class="line">CREATE TABLE employees (</span><br><span class="line">    id INT NOT NULL,</span><br><span class="line">    fname VARCHAR(30),</span><br><span class="line">    lname VARCHAR(30),</span><br><span class="line">    hired DATE NOT NULL DEFAULT '1970-01-01',</span><br><span class="line">    separated DATE NOT NULL DEFAULT '9999-12-31',</span><br><span class="line">    job_code INT,</span><br><span class="line">    store_id INT</span><br><span class="line">)PARTITION BY LINEAR KEY (store_id)</span><br><span class="line">    PARTITIONS 5;</span><br><span class="line">     </span><br><span class="line">DELIMITER $$</span><br><span class="line">DROP PROCEDURE IF EXISTS SampleProc$$</span><br><span class="line">CREATE PROCEDURE SampleProc()</span><br><span class="line">    BEGIN</span><br><span class="line">        DECLARE x INT;</span><br><span class="line">        SET x = 1;</span><br><span class="line">        WHILE x&lt;= 20 DO</span><br><span class="line">            insert into employees(id,fname,lname,hired,separated,job_code,store_id) values(x,concat('firstname',x),concat('ai',x),'1994-01-01','1999-01-01',10,x);</span><br><span class="line">            SET  x = x + 1;</span><br><span class="line">        END WHILE;</span><br><span class="line">    END$$</span><br><span class="line">/*执行存储过程*/</span><br><span class="line">call SampleProc() $$</span><br><span class="line">delimiter ;</span><br><span class="line">## 查看扫描的行数</span><br><span class="line">explain SELECT count(*) FROM employees WHERE store_id = 1 GROUP BY store_id;</span><br></pre></td></tr></table></figure>
<h2 id="u53C2_u8003_u94FE_u63A5"><a href="#u53C2_u8003_u94FE_u63A5" class="headerlink" title="参考链接"></a>参考链接</h2><p><a href="http://baike.baidu.com/link?url=pA9eRUAvufYZDOWn1dcJTSRVKBrYWFKmS4RD_3OFhFounIqjfJsNz7Jkxz_AHDs9fjW434tmWiJfA-zyW5gREa" target="_blank" rel="external">http://baike.baidu.com/link?url=pA9eRUAvufYZDOWn1dcJTSRVKBrYWFKmS4RD_3OFhFounIqjfJsNz7Jkxz_AHDs9fjW434tmWiJfA-zyW5gREa</a><br><a href="http://asyty.iteye.com/blog/1203016" target="_blank" rel="external">http://asyty.iteye.com/blog/1203016</a></p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2016/01/24/database/8.mysql性能分析/" data-id="cijzzpvh400g81cfsv22wlcw8" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/database/">database</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2016/01/27/java/17.缓存实现/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          缓存实现
        
      </div>
    </a>
  
  
    <a href="/2016/01/22/database/7.mysql使用笔记/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">mysql使用笔记</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Categories</h3>
    <div class="widget">
      <ul class="category-list"><li class="category-list-item"><a class="category-list-link" href="/categories/cache/">cache</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/database/">database</a><span class="category-list-count">13</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/docker/">docker</a><span class="category-list-count">6</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/gis/">gis</a><span class="category-list-count">4</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/git/">git</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/go/">go</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/gradle/">gradle</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/groovy/">groovy</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/hadoop/">hadoop</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/java/">java</a><span class="category-list-count">18</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/linux/">linux</a><span class="category-list-count">4</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/log/">log</a><span class="category-list-count">11</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/mongodb/">mongodb</a><span class="category-list-count">14</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/mq/">mq</a><span class="category-list-count">6</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/mybatis/">mybatis</a><span class="category-list-count">9</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/netty/">netty</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/nginx/">nginx</a><span class="category-list-count">3</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/nio/">nio</a><span class="category-list-count">19</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/nodejs/">nodejs</a><span class="category-list-count">1</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/redis/">redis</a><span class="category-list-count">6</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/rpc/">rpc</a><span class="category-list-count">14</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/spring/">spring</a><span class="category-list-count">5</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/tomcat/">tomcat</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/zookeeper/">zookeeper</a><span class="category-list-count">2</span></li><li class="category-list-item"><a class="category-list-link" href="/categories/杂项/">杂项</a><span class="category-list-count">2</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tags</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/aop/">aop</a><span class="tag-list-count">8</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/aspectj/">aspectj</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/cache/">cache</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/classloader/">classloader</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/common-loggings/">common-loggings</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/commonjs/">commonjs</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/database/">database</a><span class="tag-list-count">10</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/docker/">docker</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/dubbo/">dubbo</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/fastdfs/">fastdfs</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/gclib/">gclib</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/geohash/">geohash</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/gis/">gis</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/git/">git</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/go/">go</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/gradle/">gradle</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/groovy/">groovy</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hadoop/">hadoop</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/hessisan/">hessisan</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/java/">java</a><span class="tag-list-count">48</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/javassist/">javassist</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/kafka/">kafka</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/linux/">linux</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/log/">log</a><span class="tag-list-count">11</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/log4j/">log4j</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/logback/">logback</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/map/">map</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/memecached/">memecached</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mina/">mina</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mongodb/">mongodb</a><span class="tag-list-count">14</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mq/">mq</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mqtt/">mqtt</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/mybatis/">mybatis</a><span class="tag-list-count">9</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/netty/">netty</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/nginx/">nginx</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/nio/">nio</a><span class="tag-list-count">5</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/nodejs/">nodejs</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/postgresql/">postgresql</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/protobuf/">protobuf</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/proxy/">proxy</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/push/">push</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/rabbitmq/">rabbitmq</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/redis/">redis</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/rpc/">rpc</a><span class="tag-list-count">14</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sitemesh/">sitemesh</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/sld/">sld</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/slf4j/">slf4j</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/socket/">socket</a><span class="tag-list-count">7</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/spatialite-for-android/">spatialite for android</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/spi/">spi</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/spring/">spring</a><span class="tag-list-count">13</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/tomcat/">tomcat</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/transaction/">transaction</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/web/">web</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/xSocket/">xSocket</a><span class="tag-list-count">7</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/zbus/">zbus</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/zookeeper/">zookeeper</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/数据结构/">数据结构</a><span class="tag-list-count">2</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Tag Cloud</h3>
    <div class="widget tagcloud">
      <a href="/tags/aop/" style="font-size: 15.38px;">aop</a> <a href="/tags/aspectj/" style="font-size: 11.54px;">aspectj</a> <a href="/tags/cache/" style="font-size: 11.54px;">cache</a> <a href="/tags/classloader/" style="font-size: 10px;">classloader</a> <a href="/tags/common-loggings/" style="font-size: 10px;">common-loggings</a> <a href="/tags/commonjs/" style="font-size: 12.31px;">commonjs</a> <a href="/tags/database/" style="font-size: 16.92px;">database</a> <a href="/tags/docker/" style="font-size: 13.85px;">docker</a> <a href="/tags/dubbo/" style="font-size: 10px;">dubbo</a> <a href="/tags/fastdfs/" style="font-size: 10px;">fastdfs</a> <a href="/tags/gclib/" style="font-size: 10.77px;">gclib</a> <a href="/tags/geohash/" style="font-size: 10px;">geohash</a> <a href="/tags/gis/" style="font-size: 10px;">gis</a> <a href="/tags/git/" style="font-size: 10.77px;">git</a> <a href="/tags/go/" style="font-size: 10px;">go</a> <a href="/tags/gradle/" style="font-size: 10px;">gradle</a> <a href="/tags/groovy/" style="font-size: 10px;">groovy</a> <a href="/tags/hadoop/" style="font-size: 10px;">hadoop</a> <a href="/tags/hessisan/" style="font-size: 11.54px;">hessisan</a> <a href="/tags/java/" style="font-size: 20px;">java</a> <a href="/tags/javassist/" style="font-size: 10px;">javassist</a> <a href="/tags/kafka/" style="font-size: 11.54px;">kafka</a> <a href="/tags/linux/" style="font-size: 12.31px;">linux</a> <a href="/tags/log/" style="font-size: 17.69px;">log</a> <a href="/tags/log4j/" style="font-size: 12.31px;">log4j</a> <a href="/tags/logback/" style="font-size: 13.08px;">logback</a> <a href="/tags/map/" style="font-size: 10px;">map</a> <a href="/tags/memecached/" style="font-size: 10.77px;">memecached</a> <a href="/tags/mina/" style="font-size: 13.08px;">mina</a> <a href="/tags/mongodb/" style="font-size: 19.23px;">mongodb</a> <a href="/tags/mq/" style="font-size: 13.85px;">mq</a> <a href="/tags/mqtt/" style="font-size: 10.77px;">mqtt</a> <a href="/tags/mybatis/" style="font-size: 16.15px;">mybatis</a> <a href="/tags/netty/" style="font-size: 10px;">netty</a> <a href="/tags/nginx/" style="font-size: 11.54px;">nginx</a> <a href="/tags/nio/" style="font-size: 13.08px;">nio</a> <a href="/tags/nodejs/" style="font-size: 10px;">nodejs</a> <a href="/tags/postgresql/" style="font-size: 10.77px;">postgresql</a> <a href="/tags/protobuf/" style="font-size: 10px;">protobuf</a> <a href="/tags/proxy/" style="font-size: 10px;">proxy</a> <a href="/tags/push/" style="font-size: 10px;">push</a> <a href="/tags/rabbitmq/" style="font-size: 11.54px;">rabbitmq</a> <a href="/tags/redis/" style="font-size: 13.85px;">redis</a> <a href="/tags/rpc/" style="font-size: 19.23px;">rpc</a> <a href="/tags/sitemesh/" style="font-size: 10px;">sitemesh</a> <a href="/tags/sld/" style="font-size: 10px;">sld</a> <a href="/tags/slf4j/" style="font-size: 10px;">slf4j</a> <a href="/tags/socket/" style="font-size: 14.62px;">socket</a> <a href="/tags/spatialite-for-android/" style="font-size: 10px;">spatialite for android</a> <a href="/tags/spi/" style="font-size: 10px;">spi</a> <a href="/tags/spring/" style="font-size: 18.46px;">spring</a> <a href="/tags/tomcat/" style="font-size: 10.77px;">tomcat</a> <a href="/tags/transaction/" style="font-size: 10px;">transaction</a> <a href="/tags/web/" style="font-size: 10px;">web</a> <a href="/tags/xSocket/" style="font-size: 14.62px;">xSocket</a> <a href="/tags/zbus/" style="font-size: 10px;">zbus</a> <a href="/tags/zookeeper/" style="font-size: 10.77px;">zookeeper</a> <a href="/tags/数据结构/" style="font-size: 10.77px;">数据结构</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Archives</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/01/">January 2016</a><span class="archive-list-count">67</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/12/">December 2015</a><span class="archive-list-count">81</span></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/11/">November 2015</a><span class="archive-list-count">2</span></li></ul>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">Recents</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2016/01/30/资料/">(no title)</a>
          </li>
        
          <li>
            <a href="/2016/01/30/java/13.Classloader系列一/">ClassLoader系列一</a>
          </li>
        
          <li>
            <a href="/2016/01/29/hadoop/1.hadoop系列之源码编译/">hadoop系列一之源码编译</a>
          </li>
        
          <li>
            <a href="/2016/01/29/go/1.GO系列之入门/">Go系列一之入门</a>
          </li>
        
          <li>
            <a href="/2016/01/28/tomcat/2.tomcat性能优化/">tomcat性能优化</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2016 John Doe<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    


<script src="http://libs.baidu.com/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css">
  <script src="/fancybox/jquery.fancybox.pack.js" type="text/javascript"></script>


<script src="/js/script.js" type="text/javascript"></script>

  </div>
</body>
</html>